/**
 * Created by xiong on 17/4/19.
 */
var http = require("http");
var fs = require("fs");

var server = http.createServer(function (req, res) {
    if (req.url.startsWith("/4-11")){
        res.setHeadr("Content-Type","4_11/html");
        if (req.url.indexOf("?")>-1){
            res.end("<h1>登陆成功! <h1>");
        }else {
            fs.readFile("./4_11.html",function (err,data) {
                res.end(data);
            });
        }
    }
});